/**
 * 延迟任务系统回调
 *
 * 当满足调度条件或调度结束时，系统会回调应用中的该ability中的额方法
 */
import WorkSchedulerExtensionAbility from '@ohos.WorkSchedulerExtensionAbility';
import workScheduler from '@ohos.resourceschedule.workScheduler';
import { LogUtil } from '@zora/utils'

export default class WorkSchedulerAbility extends WorkSchedulerExtensionAbility {
  private readonly TAG: string = "WorkSchedulerAbility"

  // 延迟任务开始回调
  onWorkStart(work: workScheduler.WorkInfo) {
    LogUtil.info(`WorkSchedulerAbility - onWorkStart - work:${JSON.stringify(work)}`, this.TAG)
  }

  // 延迟任务结束回调
  onWorkStop(work: workScheduler.WorkInfo) {
    LogUtil.info(`WorkSchedulerAbility - onWorkStop - work:${JSON.stringify(work)}`, this.TAG)

  }
}
